/*
 * @Author: Easycome 2684545336@qq.com
 * @Date: 2025-01-18 01:02:46
 * @LastEditors: Easycome 2684545336@qq.com
 * @LastEditTime: 2025-04-19 23:52:44
 * @FilePath: \yupao-frontend-master\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import App from './App.vue'
// 2. 引入组件样式
import 'vant/lib/index.css';
import '../global.css'

import * as VueRouter from 'vue-router'
import routes from "./config/router";
import components from './components';


const router = VueRouter.createRouter({
    // 4. 内部提供了 history 模式的实现。
    history: VueRouter.createWebHistory(),
    routes, // `routes: routes` 的缩写
})

const app = createApp(App)
app.use(router)

// 注册自定义组件
Object.entries(components).forEach(([name, component]) => {
    app.component(name, component);
});

app.mount('#app')
